#!/bin/bash

# 修复useCollectionTask.ts - 使用query.state.data
sed -i '162s/refetchInterval: (data) => {/refetchInterval: (query) => {/' useCollectionTask.ts
sed -i '163s/if (data && (data.status/if (query.state.data \&\& (query.state.data.status/' useCollectionTask.ts

# 修复useExportTask.ts - 使用query.state.data  
sed -i '134s/refetchInterval: (data) => {/refetchInterval: (query) => {/' useExportTask.ts
sed -i '135s/if (data && (data.status/if (query.state.data \&\& (query.state.data.status/' useExportTask.ts

echo "refetchInterval updated to use query.state.data"
